public class findone {
    public static void main(String[] args) {
        int[]array = new int[]{1,2,4,5,2,1,4};
            for (int i = 0; i < array.length; i++) {
                boolean flg = false;
                for (int j = 0; j < array.length; j++) {
                    if(i != j){
                        if(array[i] == array[j]) {
                            flg = true;
                            break;
                        }
                        }
                }
                if(!flg){
                    System.out.println(array[i]);
                }
            }
        }
    }

